adding the two functions