changing of some stuff to support tokens