hostory tracking with DB