added index and some other stuff