remove unnecessary element