Add clock and test while loop.