Updated UA code