condense code using hashes to store choices