reractoring, added output manager