improved docs
+average_profile function