added some hackery from another machine