added support for index

Signed-off-by: Benjamin Reh <ich@benjaminreh.de>