added clearDB function