new parameters: aliverperiod and tmpdir
merge...