Better way for GetIdbyName