implemented mean (of rows) and eliminate_duplicate_variable_rows which allows averaging of rows with same variable