refactor name and variables