added a closure around the test