expand foreign stuff, store js object references in single variable