cleaned up the code and removed sendbuffer