Setting index as object