fixed arm reset, formatting of code