prefer class traits to function traits