refactored interfaces and classes