completed the standard insert handler
added registration script, started on error handler