grant and token controllers implementation