refactor of figlet directive