feat: add support for nested state closes #35