added function header comments