added advance method to Parser