better way to parse 'prime'