rewriting everything as a directive