remove useless length test