more static variables; initial SQL handling