a fully working script