some design corrected

new structure of database included