#2: refactored for web-less interface