kernel code implemented (not tested properly yet)
indices mechanism changed; instruction moved to device memory; simple usage example