add state and map state