fixed token error in parsefunction