change private class to private constructor and remove type declaration