added details of refactor