removed extraneous if