added cloning of attributes