change print method private to public