state almost complete, seems working