test solution to getindex