solve some harder test cases