clean up and updated with brief analysis