move package loading to the end of script