replace removeRange by remove