use part method for returning the built output instead of printing it