passing in $ij data