save results into database