add performance measuring