replaced all instances of [:] copying with .copy()