add the function that inputs the data into database file