Improved Parse Algorithm