"completed" the parser - needs optimising/tweaking