changed return type to json (testing pending)