revcieve function of room coded.