reverted the serialize back as testing code using json was left over