Transfered code for UA to RU template