added missing license headers and a System.out.println call