add assert to validate return value