refactor some vars