use while and if