add copying and index