removed inf loop