refactor future