generating mk index table