create single insert function