refactor parsing utility