add simple test , fix errors and unused interface SliceFlag