Now converting to json properly