add a few comments and match formatting with jilla original