added send and retrieve JS