big refactoring of the interface