Rewrite using tornado