Moved the logic of source to the abstract class