Updated while and if.