yet another bug fixed
added comments