structure refactored and new interfaces used