If you won't post your code I think it is difficult to get help...

Ioannis