Quantum confinement in semiconductor nanostructures