refactor: add missing semicolon, removed unused index variable