added while control exercise b