addToDB and getMinMax functions
locals
debug
debug2

it works