changed interface to collect dependencies as array