Fixed double initialization. Added simple difs. Fixed change value cauculation a bit