tornado server and fit functions