almost working script
almost working script