added some quick checks so this works if its already loaded by another plugin