index and some tweaks