code clean /  fixed incorrect display calculation