make loading more generic