added database code- group work