transforming to a class