instead of newline, add crossplatform PHP_EOL
trying different algorithm for multiplyexceptself