one more query parameterized
remove unused functions