consolidate return early statements