added support for loading 3D images