enum instead of vars and cosmetic changes