Very slow solution
Still slow