update arrange logic for smoother ui