Changed send() to write()