Correcting #3 and adding testcases
Correcting #3 and adding testcases
merge