database shell code
resolved a few conflicts