update main function of preference