wat the algo
fix many bug
does it work? start modify gui