attempt to implement copy mechanism in a quick and dirty way