acheive the if and for