add function to decode tokens