refactor references