add exception management