updated my h_sync_gen to include the flip-flops and count logic