sanity checks for lenght