removed useless if logic