added preferences model and controller