troubleshooting the code