got a working solution that takes a long time -- problem 50