restored loading functionality