clean the code and added comments.