documentation work
fix index handling