Updated to working script