pre-parse implementation