moved code from queries index to languages index