added a check for valid project so program will not hopefully crash