parsing and sum type examples