sql is all handled in code