use yield whenever possible