removed infite loop