add mode and copy constractor