fix some bugs
add beginning of unit test
add file to test the scalability