add main method to base trait