Nearly there, just got to fix a infinite loop!