combine two function together