Added send and receive functions