added 2nd clk and rewrite with modulo operation
deleted some temp files