adding in a function