use custom class instead of Trinity