first stage of refactor