starting with magic code for getindex