Added function description, assumptions, and gotchas for the readers.