replace dependencies by dependency for group key