move out in separate state file