error handler
some initial work and added mori