change element access function call to pointer access