Changed to add a function