main.js - fixed allow-numbers-only function