db statements returned in correct form