Second solution implementation. Test missing