Changed direct indexing to using get