class to public class