connecting frontend with backend