modularized into output functions, prepared for pLong calculation