add support for @bem definition

closes #2
closes #4