add functionality for inserting data to the database