Extract out method.