program for lathe calculations