final version for the class