almost working app, able to return data in JSON format