refactored remote json call