getbyname method