remove dangling statement and reformat for readability