Simple test of algorithm