added some usage of the conditional_sources functions, cleaned up existing one