updated with watch and variable for dir paths