move plugin loading function to plugins