Added code for easy preference creation