fixed several spelling errors and added "final" variable