add page state and custom state id