added copy procedure