Refactored index. Added x