Final script ready and working