Modified a function to return a value
Modified a function to use named parameters