much better munger script