Single function to get dependencies