use value from hash rather than hard code
if statements do same thing
move pres down
if blocks do the same thing
or rather than two separate blocks doing the same thing
or rather than two separate blocks doing the same thing