More work on parse function