updated code to make it work for other projects.