improving DBUtility class, with contribution from joseamGSL