changing to indexed tables