added view, debugged print code.