Add generic run loop