deleted redundant conditionals, changed dict values, changed variable name