renamed variable dict -> dic, so as not to confuse with type "dict"