some random math stuff (nah.. I'm lying :)))