implemented second strategy and passing all the tests