added function to handle the renew request