Added code for excluding specific ids