adjusted to w * log v and y * log x rather than w and log_v x, same stuff just clearer