use main class for carp