bug fixed with criteria adding