add locals to each view