typo and code cleaning