copy from class