originally from google docs.
will keep here for version control and portability