added logic to add more debugging logic