alterred:
 - minor changes to make codes better