testing the algo