Solution complete, needs to be faster