Need to change this to return a Hash, so then the when_rendering can handle the output