handle clocks on both version 3 and version 4 boards, cleaned up the api