revised interface for parsing