promotion and demotion with custom directives