major refactor time