Modified david's submission to fix formatting.