Added real time API calling functionality