edited functionality... index was accidental whitespace edit