Test main added, use it to test algorithms