fixed condition check
updated