minor bug fixing + output improvements