hacked some output functionality