tinkering,
middleware now writes sql queries, timing to log