update comments and update code for readability