Adding version check and json parsing