onEnabled method added