no more infinite loop, doesn't appear to be solving though