setByIndexPath method