Fully working script