added a parenthesis that had mysteriously disappeared
major styling overhall and refactoring