finding dependencies -- needs tests