adjusted project6 for project8