connects frontend and backend