Added VIs to write to database