comments/explanation added for math