combine tasks when possible