added Timer to insert data into database