add some magnars functions