adding docs and logging via main logger and taking db as input for main function
upgrading core