add gestion of errors