sample similar to one in expressjs.com