use pg function to insert strings