sketch of algo
pass the naive test case