Replaced unnecessary function call with the logic from the function.
Also fixed minor diplay mistake.