refactoring, changed digital outs from gates to triggers for now (will be configurable per output)