Solution for the test