using error codes of sends