add state machine
add validates to models