centralizing sql statements