i thing you better post a sample code.
coz can't see how you have declared variables, variable data types etc.

When this variables are adjusted sometimes ..
Adjusted mean ?