step 4: simplifying with tornado's generator module, using @gen.coroutine