converted to work on osx 10.7.5 (Lion)