minor refactoring
fixed minor bug in percentag display