multiple if and do-while