more sophisticated plugin loader