changing seralization to JSON