removed some unnecessary stuff, but I still think my math is bad here