one more script to hs, and some bug fixes