working for centos 5.x and 6.x versions