some minor modifcations