added parameters to grant handler