Updated the NewPass function.