move call to prettyPrint to external JavaScript file