extracted parser logic to its own ns