adding class preference.java to interact with dtb