passing data by object rather than text