a bunch of stuff I don't fully understand