Added method 'sendResult' to write the results into the DB