why don't you use vipub script? it is definitely more advanced than this script