remove extra return and consolidate statement