repackaged for 0.9+ w/ tests and directions