last condition not fulfilled. How should I solve it