made cuisql conditional so it isnt called if sql module isnt loaded