port from gorilla to tok3n libraries