not yet fixed pat parsing
but some more changes