adds and removes dependencies