Added some commentaries on function header