change to using abstract method and made abstract metadata block class