Added database insert function call