fix little brainfart with static functions. still not a perfect solution though..