using tornado 3, some coding style change