*added exceptionhandling for insert and update function