Final version with solved json