fixed repetition of conditions