refactor indents + prepare statements db