add package loaded hook