Solved no.47, but not very fast yet