added json dump for total earned