change unique_ptr to auto_ptr for mac os x compiler compatibility