detect dependencies