refactoring. ParseHead