add send and recv method with several options