addToSlot with an index parameter

In response to #406 .

@confile @christiangoudreau Do we need something more complicated than that?