added output class and method