added dynamic loading support