use cut instead of sed for osx compatibility