clean code ,using interface & factory pattern design