min delta for selection
advanced selection
fixed the db selection problem