fixed calculate_used_persentage to calculate correct values