Added functions to communicate with backend