tried to do with overloaded write() and read()