Added counter to count # of steps