some changes to add some monitoring