got while, if, else working