added condition that the contactact should not be a deleted contact