You are right. Moved the definition inside the method.