Now that I actually know how binary works, this looks a lot more efficient