saves tes to database now