Changed BEGINTOKEN to BEGIN and likewise for ENDTOKEN