slight adaptation of script for cent os