comment addition and minor function change