fix build
separate function test to single class library
add algorithm sort function and test