remove useless code
fix tests