added survey engine code