debugged problem with printf...
refactored
Merge branch 'master' into mysterious_problem