made path variable instead of static in two places