fixing json and adding links