moved 5 var STATE_ constants into STATE { ... }