updated code so that a valid obervation id is searched in a set and not a list.