beforeLoad event added