added a preference manager