Server now saves the state

proooooo 

check the commits