Refactor coalesce method for clarity.