make trait a class to ensure binary compatibility