added include guards
added function and comments