calculating item total on the fly