Add averaging script