added table name check to grant/revoke routine