a version of the backend code that returns JSON