corrected bugs in nokia program in edge cases