remove ui logic from server