rewrite to work on EL6 systems