fix crap function