working on counter sequence