some changes due to pr comments