reorganized some code and added to opening projects