repair errors, add send method cods