error handling added to session set