Add sorting to data.js, Use for transactions