part of the refactor done