adding in return function
adding in the code for the return function