added csv header and duration measurement