try to fix init and exit - wip