bad way of implementing json created