how does a laser measure work