Adding uniqueness to queries for subject