removed unneeded object copy code