some test code for algorithms