added function comments. ref #14