creating class with type()