reformatted code and typofix