removed extra check for length