some stuff that I use to calculate some other stuff