fixed stupid math