func for new class based traits