added defaultPath toggle eventing