Basic while implementation.