testcases and fix added
map function fix needed