Adding 'while' block