updating code for troubleshooting