Updated with minor edits suggested by Michael Miller.