started reorganizing of database module