next step is to replace with proper if statements -- ifelse won't cut it