refactor methodDeclaration