passed all test cases on Closure