making the two functions