updated to sub-class by source and database