pass the data into the return function