The double cell technique: a discrete dipole approach towards surface optics