add a few comments, change var names
release 5.0.0