edit 1

removed redundant if statement