adding code produced by some dude. May the odds be ever in your favor.