added more test cases and handlers