adding feature of getting json from server