added args function to endpoint and display as json