added table printing and new template