replace deprecated get with indexing