solved but some test cases missing