using interfaces and abstract class