removed isNil check