a few changes including codes to populate database