updated foundation,

fixed magellan
made magellan segregated if comm or res