Updated clock replacement function to include cases when loop is over + updating the return null part; Modifed tester for the purpose of debug. Only for Partnership purpose I upload the tester file