Moved json call into service