dynamically generate the class