updated usage of abstract class and methods