refactoring some variables