add action on wp_enqueue_scripts rather than init