working through changes to accomodate Oak for different sql setups