added counter method