why do we need to check length?