second attempt at other solution, still not working but close