Added proper calculation