* updated error handeling