use layout to decide what sources to include