how cnc lathe machine works