add uid function in model