added top and bottom criteria