rewrite dirmar message sending for better maintainability