Added a little refinement with the printif and print function.