fixed incorrect math!