changed occ fxn to have plugin external functions for each source