added json conversion and setting base_url