make helper script a little smarter