begin refactoring post parsing