made the Chr parser more generic