Made changes and working script