fixed absolute value function
changed debug output