added test algorithm