removed deprecated while 1: