Added some functionality to get data from the front-end