fixed some errors after making
changing fread/write to read/write, started get_request