fixed db statements to pass