add clock control, not tested