added function comments