WIP 2: add support for clauses