fixed typo, beautified code