removed redundant index access