Move cart adjustment to separated function