dec calculation now works