refactor combine func