reformat, removed some redundancy