significant refactor