output second implementation