added testcases for new logic