extract method.