big refactoring of bundle