finished main part from class assign