troubleshooting on homework3 & homework4