remove useless code in sample