added api comments to some functions