refactor to use variables