deleted constant CASE_STATES
updated version