add copy + minor refactor