Added controller method for updating preferences