fixed typos & reindented