add support for storing level state