refacotred, now just spits out the data