refactored non-prepared queries out