added code to query endpoint, parse data and send to jade engine.