fixed some bugs, started work on next tokens