add ability to set message flags