took data out of the function parameters