refactor variables