debugging in the process of adding preference