modified to run from any directory