more elegant implementation of curtain directive

Signed-off-by: Levi Tan Ong <levi@byimplication.com>