database part done