Rewrite combine-with method to pass tests