refactored case stmt into a reusable method, and alias now supports a
command to alias