added the check for tokens back in and removed dev print statements