adding comments and error handler for db helper