fixed comments and added badtms to the scale calc