update variables to use dictionary