remove unnecessary length check