added a length check