modified to work with new project
could use some clean up