adding a function