removed while loop, seems dangerous