addInput and output methods changed from protected to public