refactor some variables