remove unecessary condition

Simplify code to remove unecessary condition