adds while loops