subscribe to didInsertElement rather then using function hook