added option to recursively detect upstream and downstream dependencies of a job