combine two functions together