added max() for dbi driver