algorithm stub