message related functions