added more testcases and removed unused code