refactored into code-exec and code-display