refactor a bit for centos