add exeptions handling