made the front to backend connection using the cookie and fixed str to float/int conversion