eliminated sucky while loop