finally json in correct format