More elegant implementation of the abstract class