moved body content and added comments and logging for database calls
moved body content and added comments and logging for database calls