updated for modern-mode