Rearranged file for readability
updated for formatting