check length of each section