check the length