some minor changes for project 7, not very clean