add init() for initializing state blocks