save form funtion, insert pages function