declare variables just before usage