find targets and dependencies