more portable for unix , as suggested by Ripley