add state enum
add type enum toString method