added comments
line and character count implementation