more implicit checking for null loop
remove extraneous print