implemented directory watching portion