added debuggin for preference handler