add preload function to auto load modules on start