fix index 1
code cleanup