removed infinite loop; is still buggy