check data for length when limiting