problem index is work (simple version)