Updated Working Script