Updated full script