make enumerate() an instance method