using enums unstead of ints for state and controlls