Done, except that it goes over by 30 clocks, no idea why.