clear redundant tokens
make the clearing mechanism better