refine user logic.