Added indexing and max/min