extract data from msg and enabling easy msg removal