remove double negative
refactor to remove duplicated code
refactor to remove duplicate assignments
whitespace