adding package.json and fixing a bug related to switching projects