added pointless while loop