added ability to pass in an ajax data type