a helper method.