remove if statemets that weren't needed