fixed typo and indent code