code improvement notes

annotate some improvement