upstream copy of project 3