can set data and no longer need to pass it as a parameter