ADDED LOGIC TO DETERMINE IF PLUGIN ALREADY LOADED
+ added logic to determine if plugin already loaded