just a few minor modifications made so that it works more smoothly with bolo script.