added counter to index